package com.aftersale.demo.entity;

import com.aftersale.demo.utils.ValidGroup;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 
 * @TableName project
 */
@TableName(value ="project")
@Data
public class Project implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("项目id")
    private Integer id;

    /**
     * 项目名
     */
    @NotBlank(message = "项目名不能为空",groups = {ValidGroup.ProjectName.class})
    @Size(min = 0,max = 30,message = "项目名不合规",groups = {ValidGroup.ProjectName.class})
    @ApiModelProperty("项目名")
    private String name;

    /**
     * 维护绩效
     */
    @ApiModelProperty("维护绩效")
    private String maintenanceEffectiveness;

    /**
     * 项目版本
     */
    @NotBlank(message = "项目版本不能为空",groups = {ValidGroup.Version.class})
    @Size(min = 0,max = 30,message = "项目版本不合规",groups = {ValidGroup.Version.class})
    @ApiModelProperty("项目名")
    private String projectVersion;

    /**
     * 项目发布时间
     */
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date createTime;

    /**
     * 
     */
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}